// 改文件用于创建vuex中最为核心的store
import Vue from "vue"
// 0. 引入vuex
import Vuex from "vuex"
import VuexPersist from 'vuex-persist'
Vue.use(Vuex)


import editorOption from './editor'
import dialogOption from './dialog'
import topicOption from './topic'
import studyOption from './study'
import windowOption from './window'


const vuexPersist = new VuexPersist({
    key: 'online-study',
    storage: localStorage
})
export default new Vuex.Store({
    modules: {
        editorAbout: editorOption,
        topicAbout: topicOption,
        dialogAbout: dialogOption,
        studyAbout: studyOption,
        windowAbout: windowOption,
    },
    plugins: [vuexPersist.plugin]
})
